package com.lipaluma.field.merge;

public interface TargetMergedAlgorithm {
	
	/**
	 * used to initiate the merge algorithm when the first object mapped for an id is encountered.
	 * @param target the first object mapped for an id
	 * @param strings 
	 */
	void initMergeOnFirstElement(Object target, String... strings);

	/**
	 * used to merge values and will return the value merged
	 * @param oldValue the first value encountered
	 * @param valueToAdd the new value to merge
	 * @param params external parameters
	 * @return the value merged
	 */
	Object merge(Object oldValue, Object valueToAdd, String... params);
}
